﻿using System.Web;
using System.Web.Mvc;

namespace tophd.Classes.Helper
{
    public class MvcHelperAttributes
    {
    }

    public class Authorize : ActionFilterAttribute
    {
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            if (HttpContext.Current.Session["Login"] == null)
            {
                filterContext.Result = new RedirectResult("/Account/LogOn");
            }
            base.OnActionExecuting(filterContext);
        }
    }
}